import request from "@/sheep/request";

export default {
  // 地区
  getCityList: (params = {}) =>
    request({
      url: "/no-auth/movie/getCityList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),

  // 电影列表
  filmList: (params = {}) =>
    request({
      url: "no-auth/movie/filmList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),
  // 获取影院列表
  cinemaList: (params = {}) =>
    request({
      url: "no-auth/movie/cinemaList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),
  // 获取影院场次信息
  cinemaShowList: (params = {}) =>
    request({
      url: "no-auth/movie/cinemaShowList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),

  // 选座
  seatList: (params = {}) =>
    request({
      url: "no-auth/movie/seatList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),

  // 电影下单前校验
  payMovieOrderCheck: (data = {}) =>
    request({
      url: "/h5/order/movieAddCheck",
      method: "POST",
      data,
    }),
  // 电影下单
  payMovieAddOrder: (data = {}) =>
    request({
      url: "/h5/order/movieAdd",
      method: "POST",
      data,
    }),

  // 电影支付
  payMovieAdd: (data = {}) =>
    request({
      url: "/h5/order/moviePay",
      method: "POST",
      data,
    }),

  // 根据订单id 查询订单信息
  getOrderInfo: (params = {}) =>
    request({
      url: "/h5/order/getOrderInfo",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),

  // 获取用户电影订单列表
  getMovieList: (params = {}) =>
    request({
      url: "/h5/getMovieList",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),

  // 获取电影票详情 根据订单
  getMovieDetail: (params = {}) =>
    request({
      url: "/h5/order/getMovieDetail",
      method: "GET",
      params,
      custom: {
        showLoading: false,
        showError: false,
      },
    }),
  // 电影票下单 /h5/order/movieAddCheck
  movieAddCheck: (data = {}) =>
    request({
      url: "/h5/order/movieAddCheck",
      method: "POST",
      data,
    }),
};
